package dom.xpath.core.proc;

import dom.xpath.core.Prop;

/**
 * This class class assembles textual information which is used in
 * the process classes.
 * 
 * @author Workgroup DBIS, University of Konstanz 2005-07, ISC License
 * @author Christian Gruen
 */
public interface ProcText {
  /** New Line String. */
  String NL = Prop.NL;

  // XML SUFFIXES =============================================================

  /** XML Suffix. */
  String XMLSUFFIX = ".xml";
  /** XML File Description. */
  String XMLDESC = "XML Documents (*.xml)";

  // PROCESSING INFO ==========================================================

  /** Server result. */
  String SERVERRESULT = "No result available for \"%\"";

  /** Process time. */
  String PROCTIME = "Time needed: %";
  /** No Document Warning. */
  String CMDARGS = "Syntax: %";
  /** Command Execution Error. */
  String CMDERR = "Could not execute \"%\":" + NL + "%";
  /** Command Execution Error. */
  String CMDEXX = "Unexpected error:" + NL + "%";
  /** Unknown Command error. */
  String CMDWHICH = "Unknown command '%'; try 'help'.";
  /** Unknown Command error. */
  String CMDSIMILAR = "Unknown command '%'; did you mean '%'?";
  
  // FILE INFO ================================================================

  /** File not found. */
  String FILEWHICH = "Sorry, the file \"%\" was not found.";
  /** File error. */
  String FILEERR = "\"%\" could not be parsed.";

  // DATABASE INFO ============================================================

  /** No Document Warning. */
  String DBMISSING = "Please create a database first.";
  /** Block storage support. */
  String UPDATEERR = "Command is not available in main memory mode.";

  /** Database not found. */
  String DBNOTFOUND = "Database not found: %";
  /** Database is open. */
  String DBINMEM = "Database is open.";
  /** No Document in memory Warning. */
  String DBEMPTY = "No Database in memory.";
  /** Database Closed. */
  String DBCREATED = "Database created in %.";
  /** Database Optimized. */
  String DBOPTIMIZED = "Database optimized in %.";
  /** Database Closed. */
  String DBCLOSED = "Database closed.";
  /** Database not closed. */
  String DBCLOSEERR = "Database could not be closed.";
  /** Database Created. */
  String DBDROPPED = "Database dropped.";
  /** Database Created. */
  String DBNOTDROPPED = "Database could not be dropped.";
  /** Database Opened. */
  String DBOPENERR = "Database could not be opened.";
  /** Database Opened. */
  String DBINDEXED = "Index created in %.";
  /** Database Opened. */
  String DBINDEXERR = "Index could not be created.";
  /** Database Opened. */
  String DBDROP = "Index dropped.";
  /** Database Opened. */
  String DBDROPERR = "Index could not be dropped.";

  // CREATE COMMAND ===========================================================

  /** Create information. */
  String CREATETABLE = "Table created: %";
  /** Create information. */
  String CREATEATTR = "Attributes indexed: %";
  /** Create information. */
  String CREATETEXT = "Texts indexed: %";
  /** Create information. */
  String CREATEWORD = "Words indexed: %";
  /** Create information. */
  String CREATEFT = "Fulltext indexed: %";

  /** File error. */
  String IMPORTERR = "File path '%' could not be parsed.";

  // XPATH COMMAND ============================================================

  /** Query Info: Querying. */
  String QUERYINFO = "Querying...";
  /** Query Info: Optimizing. */
  String QUERYCOMPILING = "Compiling:";
  /** Query Info: Evaluating. */
  String QUERYEVAL = "Evaluating:";
  /** Query Info: Querying. */
  String QUERYTIME = "Timing:";
  /** Query Info: Compiler. */
  String QUERYSEP = "- ";
  /** Query Info: Result . */
  String QUERYRESULT = "Result: ";
  
  /** Query Info: Query. */
  String QUERYSTRING = "Query     : ";
  /** Query Info: Compiling. */
  String QUERYCOMPILE = "Compiling : ";
  /** Query Info: Evaluating. */
  String QUERYEVALUATE = "Evaluating: ";
  /** Query Info: Finishing. */
  String QUERYFINISH = "Finishing : ";
  /** Query Info: Time for printing. */
  String QUERYPRINT = "Printing  : ";
  /** Query Hits. */
  String QUERYTOTAL = "Total Time: ";

  /** Query Info: Finishing. */
  String QUERYMEM = "Memory    : %";
  /** Query Info: Time for printing. */
  String QUERYPRINTED = "Printed   : %";
  /** Query Hits. */
  String QUERY = "% Hit(s) found in %.";
  /** Query Hits. */
  String HITS = "Results   : %";
  /** Milliseconds. */
  String MS = " ms";

  // UPDATE COMMANDS ==========================================================

  /** Insert query info. */
  String QUERYNODESERR = "Query must yield a nodeset.";

  /** Deletion info. */
  String DELETEINFO = "% node(s) deleted in %.";
  /** Deletion error. */
  String DELETEROOT = "Cannot delete document node.";
  /** Insert query info. */
  String COPYROOT = "Cannot insert after root node.";

  /** Copy query info. */
  String COPYINFO = "% node(s) copied in %.";
  /** Insert query info. */
  String INSERTINFO = "% node(s) inserted in %.";
  /** Update query info. */
  String UPDATEINFO = "% node(s) updated in %.";
  /** Update node info. */
  String UPDATENODE = "Node to be updated must be a %.";
  /** Update element info. */
  String UPDATEELEM = "Node to be updated must be an element.";
  /** Update attribute info. */
  String UPDATEATTR = "Node to be updated must be an attribute.";
  /** Insert query info. */
  String COPYTAGS = "Target nodes must be elements.";
  /** Insert query info. */
  String INSERTTEXT = "Cannot insert text node after/before another text node.";
  /** Update element info. */
  String TAGINVALID = "\"%\" is not a valid tag name.";
  /** Update element info. */
  String ATTINVALID = "\"%\" is not a valid attribute name.";
  /** Duplicate attribute info. */
  String ATTDUPL = "Attribute \"%\" is already defined.";
  /** Invalid position. */
  String POSINVALID = "Invalid position value \"%\".";
  /** Update element info. */
  String PIINVALID = "PI name \"%\" is invalid.";

  // EXPORT COMMAND ===========================================================

  /** Document Declaration. */
  String DOCDECL = "<?xml version=\"1.0\" encoding=\"%\"?>";
  /** Export info. */
  String EXPORTINFO = "% exported in %.";

  // SET COMMAND ==============================================================

  /** Set option. */
  String SETWHICH = "Unknown option \"%\"";
  /** Info on Execution Times. */
  String SETTO = "set to ";

  // HELP COMMAND =============================================================

  /** Database Closed. */
  String HELPINFO = "Try 'help [...]' to get info on a specific command.";

  // PING COMMAND =============================================================

  /** Database Closed. */
  String PINGINFO = "BaseX - Connection successful." + NL;

  // SHOW ID INFO =============================================================

  /** ShowID Error. */
  String SHOWIDERROR = "Table positions expected as input.";
  
  // XMARK INFO ===============================================================

  /** XMark Error. */
  String XMARKWHICH = "XMark queries are limited from 1-20.";

  // INFO STRINGS =============================================================

  /** Info on source document. */
  String INFODBNAME = "Database Name: ";
  /** Info on document size. */
  String INFODOCSIZE = "XML Doc.Size : ";
  /** Info on database size. */
  String INFODBSIZE = "Database Size: ";
  /** Info on source document. */
  String INFODOC = "Source Path  : ";
  /** Info on document path. */
  String INFOPATH = "Path: ";
  /** Info on database time stamp. */
  String INFOTIME = "Time Stamp   : ";
  /** Info on used main memory. */
  String INFOMEM = "Used Main Memory: ";
  /** Info on database table size. */
  String INFONODES = "Table Nodes  : ";
  /** Info on execution times. */
  String INFORUNS = "Number of runs ";
  /** Maximum tree height. */
  String INFOHEIGHT = "Tree Height  : ";
  /** Document encoding. */
  String INFOENCODING = "Encoding     : ";

  /** Info on database path. */
  String INFODBPATH = "Database Path: ";
  /** Info on database. */
  String INFONODB = "No database found.";
  /** Info on database. */
  String INFODBLIST = " Databases found.";
  /** Info on database. */
  String INFODBERR = "could not be opened.";
  
  /** Info on database path. */
  String INFONEWPATH = "New Database Path: ";
  /** Info on database path. */
  String INFOPATHERR = "Database Path not found: ";
  /** Info on Query Verbosity. */
  String INFOINFO = "Process Info ";
  /** Info on Query Verbosity. */
  String INFOALL = "(All) ";
  /** Info on Debug Mode. */
  String INFODEBUG = "Debug Mode ";
  /** Info on Whitespace Chopping. */
  String INFOCHOP = "Whitespace Chopping ";
  /** Info on Entity Parsing. */
  String INFOENTITIES = "Entity Parsing ";
  /** Info on result serialization. */
  String INFOSERIALIZE = "Serialize ";
  /** Info on well formed XML serialization. */
  String INFOXMLOUTPUT = "XML Output ";
  /** Info on Main Memory mode. */
  String INFOMAINMEM = "Main Memory Mode ";
  /** Info on Text Indexing. */
  String INFOTXTINDEX = "Text Indexing ";
  /** Info on Attribute Indexing. */
  String INFOATVINDEX = "Attribute Indexing ";
  /** Info on Word Indexing. */
  String INFOWORDINDEX = "Word Indexing ";
  /** Info on Fulltext Indexing. */
  String INFOFTINDEX = "Fulltext Indexing ";

  /** Info on Document Creation. */
  String INFODB = "Database Information:";
  /** Info on Document Creation. */
  String INFOCREATE = "Document Creation:";
  /** Info on Index Creation. */
  String INFOINDEX = "Indexing:";
  /** Database Info. */
  String INFOGENERAL = "General Information:";

  /** String representation for boolean true values. */
  String INFOON = "ON";
  /** String representation for boolean false values. */
  String INFOOFF = "OFF";

  // COMMAND FLAGS, USED IN THE COMMANDS CLASS ================================

  /** Commands flag: standard. */
  int STANDARD = 0;
  /** Commands flag: printing command. */
  int PRINTING = 1;
  /** Commands flag: updating command. */
  int UPDATING = 2;
  /** Commands flag: data reference needed. */
  int DATAREF = 4;
  /** Commands flag: local command. */
  int LOCAL = 8;
  /** Commands flag: server command. */
  int SERVER = 16;
}
